import { MaxHeap } from './Heap'

export class PriorityQueue {
    constructor() {
        this.maxheap = new MaxHeap()
    }

    getSize() {
        return this.maxheap.getSize()
    }

    isEmpty() {
        return this.maxheap.isEmpty()
    }

    getFront() {
        return this.maxheap.findMax()
    }

    enqueue(e) {
        this.maxheap.add(e)
    }

    dequeue() {
        return this.maxheap.extractMax()
    }

}